<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"
      xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>项目跟踪-新增/修改</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=86e2297f1">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=222aea35">

    <style type="text/css">
        
    </style>
</head>
<body>
<div class="layout" id="app">
    <table style="width:470px;height: 160px;margin: 15px 0px 0 25px ">
        <tr>
            <td style="width: 80px;text-align: center;background-color: #f5f5f5;border:1px solid #ddd">跟踪内容</td>
            <td style="padding:5px"><textarea style="border:0;resize:none;outline: none;" cols="58" rows="8" v-model="trackInfo.trackContent" >{{trackInfo.trackContent}}</textarea></td>
        </tr>
    </table>
    <div class="south" style="height:50px;line-height:50px;text-align:center;">
        <input type="button" value="保存" class="btn oaBtn btn-sm" @click="save()"/>
    </div>
</div>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript">
    var api = frameElement.api, W = api.opener;
    var edit = new Vue({
        el: "#app",
        data: {
            currentUser: getCurrentUser(),
            trackInfo:{
                id:"",
                projectId:"",
                trackDate:"",
                trackContent:"",
                createUserId:currentUser.id
            }
        },
        methods: {
            initTrackInfo: function () {
                var that = this;
                that.trackInfo.projectId = $.wyui.page.urlParams.projectId;
                that.trackInfo.trackDate = $.wyui.page.urlParams.trackDate;
                var that = this;
                $.wyui.postMethod(urlConfig.pm.projectTrack.getProjectTrackByIdAndTrackDate, that.trackInfo, function (data) {
                    if(data != undefined){
                        that.trackInfo.trackContent = data.TRACK_CONTENT;
                        that.trackInfo.id = data.ID;
                    }
                });
            },
            save:function(){
                var that =this;
                $.wyui.postMethod(urlConfig.pm.projectTrack.saveProjectTrack, that.trackInfo, function (data) {
                    if(data.result == 1){
                        // parent.app.refresh();
                        parent.app.reloadTrack(that.trackInfo.projectId);
                        api.close();
                    }else{
                        alert("保存失败");
                    }
                });
            }

        },
        mounted: function () {
            this.initTrackInfo();           
        }
    });
</script>
</body>
</html>